/*
	huffman.c

	ATSC huffman decoding API

	Digital STREAM Technology, Inc.
*/

#include "DHL_OSAL.h"
#include "DHL_PsiAPI.h"


/********************************************************************
 *
 * huffman.c - ATSC A/65 Huffman Decoding using tables C.5 & C.7. 
 *
 * Copyright 1997-2002 TeraLogic, Inc.
 * All Rights Reserved
 *
 * $Id: //suprahd/releases/suprahd_239/suprahd_zTVApp660_239/drivers/si/ATSC/huffman.c#1 $
 * $Revision: #1 $
 * $DateTime: 2006/06/05 14:53:58 $
 * $Change: 45890 $
 * $Author: catherine.lee $
 * 
 ********************************************************************/


//#include "TLPrivate.h"
#include "DHL_bitbuffer.h"
#include "DHL_memchain.h"

//#include "ATSC_PSIP.h"

//#if SUPPORT_ATSC_PSIP

/* Huffman Special Characters */
#define STRING_TERMINATE	0x00
#define ORDER_1_ESCAPE		0x1B

/* Table element syntax */
#define LEAF_FLAG_MASK		0x80
#define LEAF_CHAR_MASK		0x7F

/* Huffman Program Title Decode Table C.5 */
static const UINT8 ProgramTitleDecodeTableC5 [] = {

	0x01, 0x00, 0x01, 0x3A, 0x01, 0x3C, 0x01, 0x3E, 0x01, 0x40, 0x01, 0x42, 
	0x01, 0x44, 0x01, 0x46, 0x01, 0x48, 0x01, 0x4A, 0x01, 0x4C, 0x01, 0x4E, 
	0x01, 0x50, 0x01, 0x52, 0x01, 0x54, 0x01, 0x56, 0x01, 0x58, 0x01, 0x5A, 
	0x01, 0x5C, 0x01, 0x5E, 0x01, 0x60, 0x01, 0x62, 0x01, 0x64, 0x01, 0x66, 
	0x01, 0x68, 0x01, 0x6A, 0x01, 0x6C, 0x01, 0x6E, 0x01, 0x70, 0x01, 0x72, 
	0x01, 0x74, 0x01, 0x76, 0x01, 0x78, 0x01, 0xCE, 0x01, 0xD2, 0x01, 0xD4, 
	0x01, 0xD6, 0x01, 0xD8, 0x01, 0xDA, 0x01, 0xDC, 0x01, 0xE6, 0x01, 0xE8, 
	0x01, 0xEA, 0x01, 0xF0, 0x01, 0xF2, 0x01, 0xF4, 0x02, 0x06, 0x02, 0x12, 
	0x02, 0x14, 0x02, 0x1C, 0x02, 0x28, 0x02, 0x30, 0x02, 0x34, 0x02, 0x36, 
	0x02, 0x38, 0x02, 0x3A, 0x02, 0x3C, 0x02, 0x3E, 0x02, 0x46, 0x02, 0x48, 
	0x02, 0x4A, 0x02, 0x4C, 0x02, 0x4E, 0x02, 0x50, 0x02, 0x52, 0x02, 0x54, 
	0x02, 0x7E, 0x02, 0x92, 0x02, 0xAC, 0x02, 0xBA, 0x02, 0xD2, 0x02, 0xE4, 
	0x02, 0xFA, 0x03, 0x06, 0x03, 0x1E, 0x03, 0x26, 0x03, 0x32, 0x03, 0x3E, 
	0x03, 0x52, 0x03, 0x64, 0x03, 0x7A, 0x03, 0x94, 0x03, 0x98, 0x03, 0xA4, 
	0x03, 0xC8, 0x03, 0xDE, 0x03, 0xE6, 0x03, 0xF4, 0x04, 0x04, 0x04, 0x06, 
	0x04, 0x0C, 0x04, 0x10, 0x04, 0x12, 0x04, 0x14, 0x04, 0x16, 0x04, 0x18, 
	0x04, 0x1A, 0x04, 0x1C, 0x04, 0x52, 0x04, 0x6A, 0x04, 0x8E, 0x04, 0xAE, 
	0x04, 0xEE, 0x05, 0x06, 0x05, 0x28, 0x05, 0x44, 0x05, 0x72, 0x05, 0x76, 
	0x05, 0x90, 0x05, 0xBE, 0x05, 0xD6, 0x06, 0x0A, 0x06, 0x44, 0x06, 0x64, 
	0x06, 0x66, 0x06, 0x9A, 0x06, 0xD0, 0x06, 0xFC, 0x07, 0x22, 0x07, 0x2C, 
	0x07, 0x46, 0x07, 0x54, 0x07, 0x7C, 0x07, 0x8A, 0x07, 0x8C, 0x07, 0x8E, 
	0x07, 0x90, 0x07, 0x92, 0x1B, 0x1C, 0xB4, 0xA4, 0xB2, 0xB7, 0xDA, 0x01, 
	0xD1, 0x02, 0x03, 0x9B, 0x04, 0xD5, 0xD9, 0x05, 0xCB, 0xD6, 0x06, 0xCF, 
	0x07, 0x08, 0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9B, 0xA0, 0xE1, 0xE5, 0xE9, 0x01, 0x80, 0xF0, 
	0x02, 0xF4, 0x03, 0x04, 0xA0, 0x13, 0xE3, 0xAD, 0xE4, 0xE9, 0xEE, 0xEF, 
	0xF0, 0xF4, 0xF6, 0xA1, 0xE1, 0xED, 0x01, 0xE2, 0x02, 0x03, 0x04, 0xA7, 
	0x05, 0x06, 0xF7, 0x07, 0x9B, 0xEC, 0x08, 0xE5, 0x09, 0x0A, 0x0B, 0x0C, 
	0x0D, 0x0E, 0xF3, 0x0F, 0x10, 0x11, 0x80, 0x12, 0x05, 0x06, 0xE5, 0xFA, 
	0xA0, 0xF9, 0x9B, 0x01, 0x80, 0xE9, 0x02, 0xE1, 0x03, 0x04, 0x9B, 0x9B, 
	0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B
};


/* Huffman Program Description Decode Table C.7 */
static const UINT8 ProgramDescriptionDecodeTableC7 [] = {

	0x01, 0x00, 0x01, 0x2C, 0x01, 0x2E, 0x01, 0x30, 0x01, 0x32, 0x01, 0x34, 
	0x01, 0x36, 0x01, 0x38, 0x01, 0x3A, 0x01, 0x3C, 0x01, 0x3E, 0x01, 0x40, 
	0x01, 0x42, 0x01, 0x44, 0x01, 0x46, 0x01, 0x48, 0x01, 0x4A, 0x01, 0x4C, 
	0x01, 0x4E, 0x01, 0x50, 0x01, 0x52, 0x01, 0x54, 0x01, 0x56, 0x01, 0x58, 
	0x01, 0x5A, 0x01, 0x5C, 0x01, 0x5E, 0x01, 0x60, 0x01, 0x62, 0x01, 0x64, 
	0x01, 0x66, 0x01, 0x68, 0x01, 0x6A, 0x01, 0xDE, 0x01, 0xE0, 0x01, 0xEA, 
	0x01, 0xEC, 0x01, 0xEE, 0x01, 0xF0, 0x01, 0xF2, 0x01, 0xF8, 0x01, 0xFA, 
	0x01, 0xFC, 0x01, 0xFE, 0x02, 0x00, 0x02, 0x04, 0x02, 0x16, 0x02, 0x20, 
	0x02, 0x22, 0x02, 0x2C, 0x02, 0x32, 0x02, 0x38, 0x02, 0x3C, 0x02, 0x40, 
	0x02, 0x44, 0x02, 0x46, 0x02, 0x4A, 0x02, 0x4C, 0x02, 0x54, 0x02, 0x56, 
	0x02, 0x58, 0x02, 0x5A, 0x02, 0x5C, 0x02, 0x5E, 0x02, 0x60, 0x02, 0x62, 
	0x02, 0x76, 0x02, 0x84, 0x02, 0x94, 0x02, 0xA2, 0x02, 0xB2, 0x02, 0xBA, 
	0x02, 0xC8, 0x02, 0xD2, 0x02, 0xDE, 0x02, 0xEA, 0x02, 0xF2, 0x02, 0xFC, 
	0x03, 0x08, 0x03, 0x10, 0x03, 0x1A, 0x03, 0x28, 0x03, 0x2A, 0x03, 0x34, 
	0x03, 0x4A, 0x03, 0x5A, 0x03, 0x5E, 0x03, 0x64, 0x03, 0x6E, 0x03, 0x70, 
	0x03, 0x72, 0x03, 0x74, 0x03, 0x76, 0x03, 0x78, 0x03, 0x7A, 0x03, 0x7C, 
	0x03, 0x7E, 0x03, 0x80, 0x03, 0xB4, 0x03, 0xCE, 0x03, 0xF0, 0x04, 0x1A, 
	0x04, 0x58, 0x04, 0x6E, 0x04, 0x8E, 0x04, 0xAC, 0x04, 0xD8, 0x04, 0xE0, 
	0x04, 0xF4, 0x05, 0x24, 0x05, 0x40, 0x05, 0x76, 0x05, 0xAE, 0x05, 0xCE, 
	0x05, 0xD0, 0x06, 0x06, 0x06, 0x34, 0x06, 0x60, 0x06, 0x86, 0x06, 0x92, 
	0x06, 0xAA, 0x06, 0xB8, 0x06, 0xDC, 0x06, 0xEC, 0x06, 0xEE, 0x06, 0xF0, 
	0x06, 0xF2, 0x06, 0xF4, 0x14, 0x15, 0x9B, 0xD6, 0xC9, 0xCF, 0xD7, 0xC7, 
	0x01, 0xA2, 0xCE, 0xCB, 0x02, 0x03, 0xC5, 0xCC, 0xC6, 0xC8, 0x04, 0xC4, 
	0x05, 0xC2, 0x06, 0xC3, 0xD2, 0x07, 0xD3, 0x08, 0xC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, 0xF3, 0xEE, 
	0xF2, 0x03, 0xE5, 0x04, 0xE8, 0xA0, 0xE1, 0x05, 0xEF, 0x06, 0x07, 0x08, 
	0xE9, 0x09, 0x05, 0x06, 0xA0, 0xAC, 0xAD, 0xF4, 0xE9, 0x01, 0x02, 0xE1, 
	0xE5, 0x03, 0x9B, 0x04, 0x11, 0xA0, 0xBF, 0xE1, 0xE2, 0xE6, 0xED, 0xE4, 
	0xE9, 0xF7, 0xA7, 0x01, 0x02, 0xBB, 0x03, 0x04, 0xEC, 0x05, 0x9B, 0xEE, 
	0x06, 0xEF, 0x07, 0xAC, 0xE5, 0xF3, 0x08, 0x09, 0x0A, 0xAE, 0x0B, 0x0C, 
	0x0D, 0x0E, 0x0F, 0x10, 0x06, 0x07, 0xA0, 0xAE, 0xE1, 0xE5, 0xEC, 0xFA, 
	0x9B, 0xEF, 0xE9, 0x01, 0x02, 0x03, 0x04, 0x05, 0x9B, 0x9B, 0x9B, 0x9B, 
	0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B
};




/*==============================================================================
ErrCode DecodeHuffmanString (UINT8 *compressedStr, UINT32 length,
						compress_type_k type, char *text, UINT32 textlen)

	*compressedStr:	Pointer to the first byte of the compressed string.
	length:		Length of the compressed string.
	type:			Specifies which Huffman encoding table was used.
	*text:		Pointer to the decoded text string.
	textlen:		Length of text buffer.

Decodes a Huffman-encoded text string into the provided character buffer.
==============================================================================*/
ErrCode DHL_PSI_DecodeHuffmanString (UINT8 *compressedStr, UINT32 length,
						compress_type_k type, char *text, UINT32 textlen)
{
	bitBuffer_t				tBits;
	bitBufferPtr_t			bits = &tBits;
	const UINT8		*DecodeTable;
	UINT32		textindex;
	UINT32		bitsremaining;
	UINT8			hbit;
	UINT8			decodedchar;
	BOOLEAN		firstOrderEsc;
	BOOLEAN		charDecoded;
	UINT16		tableoffset;
	UINT16		treerootoffset;
	UINT8			child_word_offset_or_char_leaf;
	ErrCode		err = noError;
	
	DHL_ASSERT(((type == cm_Huffman_C4C5) || (type == cm_Huffman_C6C7)), "DecodeHuffmanString()\n");

	bitBufferInitialize(bits,compressedStr,length);
	
	/* Select the Huffman Decode Table C.5 or C.7 */
	if (type == cm_Huffman_C4C5) {
		DecodeTable = ProgramTitleDecodeTableC5;
	}
	else {
		DecodeTable = ProgramDescriptionDecodeTableC7;
	}

	textindex = 0;
	bitsremaining = 8 * length;

	decodedchar = STRING_TERMINATE;	/* initial value */
	firstOrderEsc = FALSE;
    if (0) {
        DHL_ASSERT(!((int) DecodeTable) & 1, "alignment assumption is broken");
        tableoffset = ((UINT16 *)DecodeTable)[decodedchar];
    }
    else {
        tableoffset = DecodeTable[decodedchar*2+0] << 8 |
            DecodeTable[decodedchar*2+1];
    }

	while (bitsremaining && (textlen > 1)) {	/* space for EOS char */

		/* any character which follows a character from the set (127-255) is uncompressed */
		/* any character which follows a first-order escape character is uncompressed */
		if (decodedchar > 127 || firstOrderEsc == TRUE) {
			/* uncompressed */
			decodedchar = bitBufferGetBits(bits,8);
			bitsremaining -= 8;
			firstOrderEsc = FALSE;
		}
		else {
            if (0) {
                DHL_ASSERT(!((int) DecodeTable) & 1, "alignment assumption is broken");
                /* compressed */
                treerootoffset = tableoffset = ((UINT16 *)DecodeTable)[decodedchar];
            }
            else {
                treerootoffset = tableoffset =
                    DecodeTable[decodedchar*2+0] << 8 |
                    DecodeTable[decodedchar*2+1];
            }

			/* decode a character */
			charDecoded = FALSE;
			while (charDecoded == FALSE && bitsremaining) {

				/* Get a bit */
				hbit = bitBufferGetBits(bits,1);
				bitsremaining--;

				if (hbit) {
					/* right child word offset or char leaf */
					child_word_offset_or_char_leaf = DecodeTable[tableoffset+1];
				}
				else {
					/* left child word offset or char leaf */
					child_word_offset_or_char_leaf = DecodeTable[tableoffset];
				}

				/* child node or leaf character? */
				if (child_word_offset_or_char_leaf & LEAF_FLAG_MASK) {
					/* leaf character */
					decodedchar = child_word_offset_or_char_leaf & LEAF_CHAR_MASK;
					charDecoded = TRUE;
				}
				else {
					/* child node */
					tableoffset = treerootoffset + (2 * child_word_offset_or_char_leaf);
				}
			}

			/* check for first-order escape character */
			if (decodedchar == ORDER_1_ESCAPE) {
				firstOrderEsc = TRUE;
			}
		}

		/* first-order escape character is a control character only */
		if (firstOrderEsc == FALSE) {
			text[textindex++] = decodedchar;
			textlen--;
		}
	}

	/* terminate the string with ASCII Null */
	text[textindex] = STRING_TERMINATE;

	return (err);
}

//#endif // SUPPORT_ATSC_PSIP

